<?php $numNewUsers = User::model()->countByAttributes(array('registrationComplete'=>0)); ?>
<ul class="operations">
    <?php if(Yii::app()->user->checkAccess('admin')) : ?>
    <li><?php echo CHtml::link(CHtml::encode(Yii::t('site','Administration')),array('/admin')); ?></li>
    <?php if($numNewUsers>0) : ?>    
    <li><?php echo CHtml::link(CHtml::encode(Yii::t('site','1#{numNewUsers} New User|n>1#{numNewUsers} New Users',array($numNewUsers,'{numNewUsers}'=>$numNewUsers))),array('/admin/user','User[registrationComplete]'=>0)); ?></li>
    <?php endif; ?>
    <?php endif; ?>
    <li><?php echo CHtml::link(Yii::t('site','User Settings'),array('/site/settings')); ?></li>
    <li><?php echo CHtml::linkButton(Yii::t('site','Logout'),array(
	'submit'=>'',
	'params'=>array('command'=>'logout'),
    )); ?></li>
    <li>
<?php echo CHtml::form() ?>
    <div id="langdrop" style="vertical-align:middle">
        &nbsp;&nbsp;&nbsp;<?php echo CHtml::encode(Yii::t('site','Language:')); ?>&nbsp;
        <?php echo CHtml::dropDownList(
            '_lang', 
            $currentLang, 
            array(
                'en_us' => Yii::t('site','English'), 
                'de' => Yii::t('site','German')
            ),
            array('onchange'=>"self.location.href='?_lang='+this.value;",'style'=>'font-size:9pt')
        ) ?>
    </div>
</form>
    </li>
</ul>

